package Chat_program_Rasmus;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.FlowLayout;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.JButton;

public class user_login_GUI extends JFrame {

	private JPanel contentPane;
	private JTextField textfield_username;
	private JPasswordField password;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					user_login_GUI frame = new user_login_GUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public user_login_GUI() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 238, 160);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel label_username = new JLabel("Username");
		label_username.setBounds(10, 10, 80, 20);
		label_username.setHorizontalAlignment(SwingConstants.LEFT);
		contentPane.add(label_username);
		
		JLabel label_password = new JLabel("Password");
		label_password.setBounds(10, 40, 80, 20);
		contentPane.add(label_password);
		
		JButton button_login = new JButton("Login User");
		button_login.setBounds(10, 70, 99, 51);
		contentPane.add(button_login);
		
		JButton button_new_user = new JButton("New User");
		button_new_user.setBounds(120, 70, 100, 20);
		contentPane.add(button_new_user);
		
		JButton button_cancel = new JButton("Cancel");
		button_cancel.setBounds(120, 101, 100, 20);
		contentPane.add(button_cancel);
		
		textfield_username = new JTextField();
		textfield_username.setBounds(100, 10, 120, 20);
		contentPane.add(textfield_username);
		textfield_username.setColumns(10);
		
		password = new JPasswordField();
		password.setBounds(100, 40, 120, 20);
		password.setColumns(10);
		contentPane.add(password);
	}

}
